package com.qfedu.edu.seckill.classservice.feign.api;

import com.qfedu.edu.seckill.po.StockStorage;
import com.qfedu.edu.seckill.result.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @author xiaobobo
 * @title: StockStorageService
 * @projectName cd-java-2404-seckill-parent
 * @description: 这个是第三方服务调用的包
 * @date 2025/1/13  14:28
 */
@FeignClient(value = "storage-service")
public interface StockStorageService {

    /**
     * 查询所有的库存信息
     *
     * @return
     */
    @GetMapping("/storageservice/stock-storage/list")
    @ResponseBody
    R list();


    /**
     * 添加库存信息
     * @param classId
     * @param quantity
     * @return
     */
    @PostMapping("/storageservice/stock-storage/addStockStorage")
    @ResponseBody
    R addStockStorage(@RequestParam("classId") String classId, @RequestParam("quantity") Integer quantity);


}
